﻿using System;
using System.Collections;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Xml.Linq;

namespace Jy123.Web.home
{
    /// <summary>
    /// $codebehindclassname$ 的摘要说明
    /// </summary>
    [WebService(Namespace = "http://tempuri.org/")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    public class GetPsw : IHttpHandler
    {

        public void ProcessRequest(HttpContext context)
        {
            string msg = string.Empty;
            string strEmail = context.Request["txtEmail"].Trim();
            if (!string.IsNullOrEmpty(strEmail))
            {
                bool sendEmailSuccess = false;                
                string strDESEmail = DBUtility.DESEncrypt.Encrypt(strEmail);
                //发送找回密码的邮件

                if (sendEmailSuccess)
                {
                    msg = "发送成功!请查收邮件,ok";
                }
                else
                {
                    msg = "发送失败！,error";
                }
            }
            context.Response.ContentType = "text/plain";
            context.Response.Write(msg);
        }

        public bool IsReusable
        {
            get
            {
                return false;
            }
        }
    }
}
